package com.ParkingManager.app.web;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.ParkingManager.app.bean.Parking;
import com.ParkingManager.app.service.ManageService;


@RestController
public class ManageController {
	@Autowired
	private ManageService manageService;
	
	@RequestMapping("/Manage/getParking")
	public List<Parking> getLessons(){
		System.out.println("hello");
	return manageService.getParking();
	}
	
	@RequestMapping("/Manage/insertParking")
	public boolean insertLessons(Parking park){
		
	return manageService.insertParking(park);
	}
	
	@RequestMapping("/Manage/updateParking")
	public boolean updateLessons(Parking park){
		
	return manageService.updateParking(park);
	}
	
	@RequestMapping("/Manage/delectParking")
	public boolean delectLessons(int id){
		
	return manageService.delectParking(id);
	}
}
